-- 2012-05-17 EM
alter procedure sp_get_user_by_phone
	@Phone varchar(21),
	@uid int output
as
begin
	set nocount on;
	
	set @uid = null;

	
	select @uid = uid from dbdata.dbo.phones where phone = @phone and dt_removed is null and enabled=1;
end;
go

grant execute on sp_get_user_by_phone to Executer;